package com.cykj.chat.mapper;

import com.cykj.common.entity.ChatRecordDO;
import com.cykj.common.entity.ContactInfoDO;
import com.cykj.common.entity.HrDO;
import com.cykj.common.entity.UserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
public interface ChatMapper {

    int getUnReadNum(@Param("contactInfo") ContactInfoDO contactInfoDO, @Param("myRole") String myRole, @Param("myId") Integer myId);

    List<ContactInfoDO> getContactList(@Param("myRole")String myRole, @Param("myId") Integer myId, @Param("yourRole") String role);

    List<ChatRecordDO> getConcretChat(@Param("myRole")String myRole,
                                      @Param("myId") Integer myId,
                                      @Param("yourRole") String yourRole,
                                      @Param("yourRoleId")Integer yourRoleId);

    int addRecord(ChatRecordDO chatRecordDO);

    int read(@Param("myRole")String myRole,@Param("myId") Integer myId);

    List<String> getCommonExpression(@Param("role") String role);


    UserDO getUserInfo(@Param("userId") int userId);

    HrDO getHrInfo(@Param("hrId")int hrId);

    Integer getHrIsBlocked(@Param("userId")Integer receiveId,@Param("hrId") Integer sendId);

    UserDO getUserBlockedInfo(@Param("userId")Integer sendId, @Param("hrId")Integer receiveId);
}
